home *** CD-ROM | disk | FTP | other *** search
/ Basic Instinct 2 Press Kit / Basic Instinct 2 Press Kit.iso / pc / main.dxr / Internal_36_RecordSet parent.ls < prev    next >
Encoding:
Text File  |  2006-03-15  |  10.0 KB  |  312 lines

  1. property pStepframe, pMasterCount, pCurrentCount, pDownLoadsMasterCount, pDownLoadsCount, pImagesMasterCount, pImagesCount, pFlashPaperMasterCount, pFlashPaperCount, pFlashObject, pDirectorToFlashFinished, pMasterList, pmode
  2. global gRecordSet, gTracker, gMaster
  3.  
  4. on new me
  5.   pMasterList = []
  6.   pDirectorToFlashFinished = "no"
  7.   pStepframe = "none"
  8.   pmode = "none"
  9.   pMasterCount = 0
  10.   pCurrentCount = 0
  11.   pDownLoadsMasterCount = 0
  12.   pImagesMasterCount = 0
  13.   pDownLoadsCount = 0
  14.   pImagesCount = 0
  15.   pFlashPaperCount = 0
  16.   pFlashPaperMasterCount = 0
  17.   return me
  18. end
  19.  
  20. on stepFrame me
  21.   case pmode of
  22.     "none":
  23.     "storedData":
  24.       case pStepframe of
  25.         "none":
  26.           nothing()
  27.         "general":
  28.           put "general started: " & "count is: " & pCurrentCount
  29.           gRecordSet.mAddGeneralStored(gRecordSet.pCurrentCount)
  30.           pStepframe = "Sections"
  31.         "Sections":
  32.           put "Sections started: " & "count is: " & pCurrentCount
  33.           gRecordSet.mAddSectionsStored(gRecordSet.pCurrentCount)
  34.           pStepframe = "DownLoads"
  35.         "DownLoads":
  36.           put "DownLoads started: " & "count is: " & pCurrentCount
  37.           pDownLoadsMasterCount = gRecordSet.pMasterList[gRecordSet.pCurrentCount][3].count
  38.           if pDownLoadsMasterCount = 0 then
  39.             pStepframe = "Images"
  40.           else
  41.             pDownLoadsCount = 1
  42.             me.mAddDownLoadsStored(pDownLoadsCount, gRecordSet.pCurrentCount)
  43.           end if
  44.         "IsDownLoadsFinished":
  45.           put "IsDownLoadsFinished started: " & "count is: " & pCurrentCount
  46.           pDownLoadsCount = pDownLoadsCount + 1
  47.           if pDownLoadsCount > pDownLoadsMasterCount then
  48.             pStepframe = "Images"
  49.           else
  50.             me.mAddDownLoadsStored(pDownLoadsCount, gRecordSet.pCurrentCount)
  51.           end if
  52.         "Images":
  53.           put "Images started: " & "count is: " & pCurrentCount
  54.           pImagesMasterCount = gRecordSet.pMasterList[gRecordSet.pCurrentCount][4].count
  55.           if pImagesMasterCount = 0 then
  56.             pStepframe = "FlashPaper"
  57.           else
  58.             pImagesCount = 1
  59.             me.mAddImagesStored(pImagesCount, gRecordSet.pCurrentCount)
  60.           end if
  61.         "IsImagesFinished":
  62.           put "IsImagesFinished started: " & "count is: " & pCurrentCount
  63.           pImagesCount = pImagesCount + 1
  64.           if pImagesCount > pImagesMasterCount then
  65.             pStepframe = "FlashPaper"
  66.           else
  67.             me.mAddImagesStored(pImagesCount, gRecordSet.pCurrentCount)
  68.           end if
  69.         "FlashPaper":
  70.           put "FlashPaper started: " & "count is: " & pCurrentCount
  71.           pFlashPaperMasterCount = gRecordSet.pMasterList[gRecordSet.pCurrentCount][5].count
  72.           if pFlashPaperMasterCount = 0 then
  73.             pStepframe = "sendColdFusion"
  74.           else
  75.             pFlashPaperCount = 1
  76.             me.mAddFlashPaperStored(pFlashPaperCount, gRecordSet.pCurrentCount)
  77.           end if
  78.         "IsFlashPaperFinished":
  79.           put "IsFlashPaperFinished started: " & "count is: " & pCurrentCount
  80.           pFlashPaperCount = pFlashPaperCount + 1
  81.           if pFlashPaperCount > pFlashPaperMasterCount then
  82.             pStepframe = "sendColdFusion"
  83.           else
  84.             me.mAddFlashPaperStored(pFlashPaperCount, gRecordSet.pCurrentCount)
  85.           end if
  86.         "sendColdFusion":
  87.           put "sendColdFusion started: " & "count is: " & pCurrentCount
  88.           gRecordSet.mSendToColdFusion()
  89.           pStepframe = "wrapUp"
  90.         "wrapUp":
  91.           put "wrapUp started: " & "count is: " & pCurrentCount
  92.           pCurrentCount = pCurrentCount + 1
  93.           if pCurrentCount > pMasterCount then
  94.             pStepframe = "CompleteWrapUp"
  95.           else
  96.             pStepframe = "general"
  97.             pFlashObject.mReSetArrays()
  98.           end if
  99.         "CompleteWrapUp":
  100.           pStepframe = "none"
  101.           pmode = "none"
  102.           gTracker.mDeleteFileFromFolder()
  103.       end case
  104.     "currentData":
  105.       case pStepframe of
  106.         "none":
  107.           nothing()
  108.         "general":
  109.           put "general started"
  110.           mAddGeneral()
  111.           pStepframe = "Sections"
  112.         "Sections":
  113.           put "Sections started"
  114.           mAddSections()
  115.           pStepframe = "DownLoads"
  116.         "DownLoads":
  117.           put "DownLoads started"
  118.           pDownLoadsMasterCount = gTracker.pDownLoadList.count
  119.           if pDownLoadsMasterCount = 0 then
  120.             pStepframe = "Images"
  121.           else
  122.             pDownLoadsCount = 1
  123.             me.mAddDownLoads(pDownLoadsCount)
  124.           end if
  125.         "IsDownLoadsFinished":
  126.           put "IsDownLoadsFinished started"
  127.           pDownLoadsCount = pDownLoadsCount + 1
  128.           if pDownLoadsCount > pDownLoadsMasterCount then
  129.             pStepframe = "Images"
  130.           else
  131.             me.mAddDownLoads(pDownLoadsCount)
  132.           end if
  133.         "Images":
  134.           put "Images started"
  135.           pImagesMasterCount = gTracker.pPhotoViewList.count
  136.           if pImagesMasterCount = 0 then
  137.             pStepframe = "FlashPaper"
  138.           else
  139.             pImagesCount = 1
  140.             me.mAddImages(pImagesCount)
  141.           end if
  142.         "IsImagesFinished":
  143.           put "IsImagesFinished started"
  144.           pImagesCount = pImagesCount + 1
  145.           if pImagesCount > pImagesMasterCount then
  146.             pStepframe = "FlashPaper"
  147.           else
  148.             me.mAddImages(pImagesCount)
  149.           end if
  150.         "FlashPaper":
  151.           put "FlashPaper started"
  152.           pFlashPaperMasterCount = gTracker.pFlashPaperViewList.count
  153.           if pFlashPaperMasterCount = 0 then
  154.             pStepframe = "wrapUp"
  155.           else
  156.             pFlashPaperCount = 1
  157.             me.mAddFlashPaper(pFlashPaperCount)
  158.           end if
  159.         "IsFlashPaperFinished":
  160.           put "IsFlashPaperFinished started"
  161.           pFlashPaperCount = pFlashPaperCount + 1
  162.           if pFlashPaperCount > pFlashPaperMasterCount then
  163.             pStepframe = "wrapUp"
  164.           else
  165.             me.mAddFlashPaper(pFlashPaperCount)
  166.           end if
  167.         "wrapUp":
  168.           put "wrapUp started"
  169.           gRecordSet.mSendToColdFusion()
  170.           pStepframe = "none"
  171.           pmode = "none"
  172.           pDirectorToFlashFinished = "yes"
  173.       end case
  174.   end case
  175. end
  176.  
  177. on mProcessCurrentRecordSet me
  178.   pFlashObject.mReSetArrays()
  179.   pDirectorToFlashFinished = "no"
  180.   pMasterCount = 1
  181.   pmode = "currentData"
  182.   pStepframe = "general"
  183.   mDeleteActor(me)
  184.   mAddActor(me)
  185. end
  186.  
  187. on mProcessStoredRecordSet me
  188.   gRecordSet.pFlashObject.mReSetArrays()
  189.   pDirectorToFlashFinished = "no"
  190.   gRecordSet.pMasterCount = gRecordSet.pMasterList.count
  191.   pmode = "storedData"
  192.   pCurrentCount = 1
  193.   pStepframe = "general"
  194.   mDeleteActor(me)
  195.   mAddActor(me)
  196. end
  197.  
  198. on mOneRecordSet me
  199.   pMasterCount = 1
  200. end
  201.  
  202. on mMoreRecordSets me, vCount
  203.   pMasterCount = vCount
  204. end
  205.  
  206. on mAddGeneral me
  207.   a = gTracker.pGeneralList.sessionID
  208.   b = gMaster.pGeneralSettings.presskitid
  209.   c = gTracker.pGeneralList.startDateTime
  210.   d = gTracker.pGeneralList.endDateTime
  211.   e = gTracker.pGeneralList.screenheight
  212.   f = gTracker.pGeneralList.screenwidth
  213.   g = gTracker.pGeneralList.screendepth
  214.   h = gTracker.pGeneralList.platform
  215.   pFlashObject.mAddGeneral(a, b, c, d, e, f, g, h)
  216. end
  217.  
  218. on mAddGeneralStored me, vListNumber
  219.   a = gRecordSet.pMasterList[vListNumber][1].sessionID
  220.   b = gRecordSet.pMasterList[vListNumber][1].pkID
  221.   c = gRecordSet.pMasterList[vListNumber][1].startDateTime
  222.   d = gRecordSet.pMasterList[vListNumber][1].endDateTime
  223.   e = gRecordSet.pMasterList[vListNumber][1].screenheight
  224.   f = gRecordSet.pMasterList[vListNumber][1].screenwidth
  225.   g = gRecordSet.pMasterList[vListNumber][1].screendepth
  226.   h = gRecordSet.pMasterList[vListNumber][1].platform
  227.   pFlashObject.mAddGeneral(a, b, c, d, e, f, g, h)
  228. end
  229.  
  230. on mAddSections me
  231.   a = gTracker.pSectionList.main
  232.   b = gTracker.pSectionList.first
  233.   c = gTracker.pSectionList.gallery
  234.   d = gTracker.pSectionList.slideshow
  235.   e = gTracker.pSectionList.trailer
  236.   f = gTracker.pSectionList.poster
  237.   g = gTracker.pSectionList.logos
  238.   h = gTracker.pSectionList.notes
  239.   i = gTracker.pSectionList.summary
  240.   j = gTracker.pSectionList.flashpaper
  241.   k = gTracker.pSectionList.website
  242.   pFlashObject.mAddSection(a, b, c, d, e, f, g, h, i, j, k)
  243. end
  244.  
  245. on mAddSectionsStored me, vListNumber
  246.   a = gRecordSet.pMasterList[vListNumber][2].main
  247.   b = gRecordSet.pMasterList[vListNumber][2].first
  248.   c = gRecordSet.pMasterList[vListNumber][2].gallery
  249.   d = gRecordSet.pMasterList[vListNumber][2].slideshow
  250.   e = gRecordSet.pMasterList[vListNumber][2].trailer
  251.   f = gRecordSet.pMasterList[vListNumber][2].poster
  252.   g = gRecordSet.pMasterList[vListNumber][2].logos
  253.   h = gRecordSet.pMasterList[vListNumber][2].notes
  254.   i = gRecordSet.pMasterList[vListNumber][2].summary
  255.   j = gRecordSet.pMasterList[vListNumber][2].flashpaper
  256.   k = gRecordSet.pMasterList[vListNumber][2].website
  257.   pFlashObject.mAddSection(a, b, c, d, e, f, g, h, i, j, k)
  258. end
  259.  
  260. on mAddDownLoads me, vCount
  261.   a = gTracker.pDownLoadList[vCount][1]
  262.   b = gTracker.pDownLoadList[vCount][2]
  263.   pFlashObject.mAddDownLoads(a, b)
  264.   pStepframe = "IsDownLoadsFinished"
  265. end
  266.  
  267. on mAddDownLoadsStored me, vCount, vListNumber
  268.   a = gRecordSet.pMasterList[vListNumber][3][vCount][1]
  269.   b = gRecordSet.pMasterList[vListNumber][3][vCount][2]
  270.   pFlashObject.mAddDownLoads(a, b)
  271.   pStepframe = "IsDownLoadsFinished"
  272. end
  273.  
  274. on mAddImages me, vCount
  275.   a = gTracker.pPhotoViewList[vCount]
  276.   pFlashObject.mAddImages(a)
  277.   pStepframe = "IsImagesFinished"
  278. end
  279.  
  280. on mAddImagesStored me, vCount, vListNumber
  281.   a = gRecordSet.pMasterList[vListNumber][4][vCount]
  282.   pFlashObject.mAddImages(a)
  283.   pStepframe = "IsImagesFinished"
  284. end
  285.  
  286. on mAddFlashPaper me, vCount
  287.   a = gTracker.pFlashPaperViewList[vCount]
  288.   pFlashObject.mAddFlashPaper(a)
  289.   pStepframe = "IsFlashPaperFinished"
  290. end
  291.  
  292. on mAddFlashPaperStored me, vCount, vListNumber
  293.   a = gRecordSet.pMasterList[vListNumber][5][vCount]
  294.   pFlashObject.mAddFlashPaper(a)
  295.   pStepframe = "IsFlashPaperFinished"
  296. end
  297.  
  298. on mSendToColdFusion me
  299.   pFlashObject.mSendNewToColdFusion()
  300. end
  301.  
  302. on mAddActor me
  303.   add(the actorList, me)
  304. end
  305.  
  306. on mDeleteActor me
  307.   where = getOne(the actorList, me)
  308.   if where > 0 then
  309.     deleteAt(the actorList, where)
  310.   end if
  311. end
  312.